<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>{% block title %}CuteFlow{% endblock %}</title>
        {% block stylesheets %}{% endblock %}
        <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
    </head>
    <body>
        <div id="wrapper">
            <div id="top-menu">
                
                <div id="account">
                    {% if app.user %}
                        <ul>
                            <li>
                                <a class="my-account" 
                                   href="{{ path('cuteflow_my_account') }}">
                                    {{ "basic.my_account" | trans }}
                                </a>
                            </li>
                            <li>
                                <a class="logout" 
                                   href="{{ path('cuteflow_logout') }}">
                                     {{ "basic.sign_out" | trans }}
                                </a>
                            </li>
                        </ul>
                    {% endif %}
                </div>
                
                {% if app.user %}
                    <div id="loggedas">
                        {{ "basic.logged_in_as" | trans }} <a href="{{ path('cuteflow_user_show', {'username': app.user.username}) }}">{{ app.user.username }}</a>
                    </div>
                {% endif %}

                <ul>
                    <li><a href="{{ path('cuteflow_dashboard') }}">{{ "basic.home" | trans }}</a></li>
                    {% if app.user and is_granted('ROLE_CUTEFLOW_ADMIN') %}
                        <li><a href="{{ path('cuteflow_admin_index') }}">{{ "basic.administration" | trans }}</a></li>
                    {% endif %}
                    <li><a href="http://www.cuteflow.org/guide/v4">{{ "basic.help" | trans }}</a></li>
                </ul>
            </div>
            <div id="header">
                <h1>
                    CuteFlow {% block projectname %}{% endblock %}
                </h1>
                <div id="main-menu">
                    {% block mainmenu %}{% endblock %}
                </div>                
            </div>

            <div id="main" {% block sidebarclass %} {% endblock %} >
                <div id="sidebar">{% block sidebar %}{% endblock %}</div>
                <div id="content">
                    <div class="contextual">{% block contextual %}{% endblock %}</div>
                    {% block body %}{% endblock %}
                </div>
            </div>
            <div id="footer">
                Powered by <a href="https://github.com/cuteflow" target="_blank">CuteFlow</a> {{ version }}
            </div>
        </div>

        {% block javascripts %}

        {% endblock %}
    </body>
</html>
